
//License Information
/*
    Copyright 2010 Jozsef Jantek

    This file is part of HunterTC.

    HunterTC is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    HunterTC is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with HunterTC.  If not, see <http://www.gnu.org/licenses/>.
*/

package huntertc;

import javax.swing.*;

public class TalentTree
{
    public class Talent
    {
        String name="Talent", desc="";
        public int max=0, val=0, dep=0, reqd=0, tree_dep=0;
        JButton butt;
    }

    public class Glyph
    {
        String name="Glyph", desc="";
        boolean active=false;
    }

    public int BMp=7;
    public int MMp=57;
    public int SVp=7;
    //public int Allp=71;
    public int Maxp=71;

    Talent[] BM= new Talent[27];
    Talent[] MM= new Talent[28];
    Talent[] SV= new Talent[29];

    Glyph[] GL= new Glyph[27];
    Glyph[] gl= new Glyph[6];

    public void BMReset()
    {
        for(int i=1;i<27;i++) { BM[i].val=0;}
        BMp=0;
        Allp();
    }

    public void MMReset()
    {
        for(int i=1;i<28;i++) { MM[i].val=0;}
        MMp=0;
        Allp();
    }

    public void SVReset()
    {
        for(int i=1;i<29;i++) { SV[i].val=0;}
        SVp=0;
        Allp();
    }

    public void AllReset()
    {
        BMReset();
        MMReset();
        SVReset();
    }

    public int Allp()
    {
        return BMp+MMp+SVp;
    }

    TalentTree()
    {

        for(int i=0;i<27;i++) BM[i]=new Talent();
        for(int i=0;i<28;i++) MM[i]=new Talent();
        for(int i=0;i<29;i++) SV[i]=new Talent();

        //Beastmastery
        BM[1].name="Improved Aspect of the Hawk";
        BM[1].desc="While Aspect of the Hawk or Dragonhawk is active, all normal ranged attacks have a 10% chance of increasing ranged attack speed by "+BM[1].val*3+"% for 12 sec.";
        BM[1].max=5;
        BM[1].val=5;
        BM[1].tree_dep=0;

        BM[2].name="Endurance Training";
        BM[2].desc="";
        BM[2].max=5;
        BM[2].val=0;
        BM[2].tree_dep=0;

        BM[3].name="Focused Fire";
        BM[3].desc="All damage caused by you is increased by "+BM[3].val+"% while your pet is active and the critical strike chance of your pet's special abilities is increased by "+BM[3].val*10+"% while Kill Command is active.";
        BM[3].max=2;
        BM[3].val=2;
        BM[3].tree_dep=5;

        BM[4].name="Improved Aspect of the Monkey";
        BM[4].desc="";
        BM[4].max=3;
        BM[4].val=0;
        BM[4].tree_dep=5;

        BM[5].name="Thick Hide";
        BM[5].desc="";
        BM[5].max=3;
        BM[5].val=0;
        BM[5].tree_dep=5;

        BM[6].name="Improved Revive Pet";
        BM[6].desc="";
        BM[6].max=2;
        BM[6].val=0;
        BM[6].tree_dep=5;

        BM[7].name="Pathfinding";
        BM[7].desc="";
        BM[7].max=2;
        BM[7].val=0;
        BM[7].tree_dep=10;

        BM[8].name="Aspect Mastery";
        BM[8].desc="";
        BM[8].max=1;
        BM[8].val=0;
        BM[8].tree_dep=10;

        BM[9].name="Unleashed Fury";
        BM[9].desc="";
        BM[9].max=5;
        BM[9].val=0;
        BM[9].tree_dep=10;

        BM[10].name="Improved Mend Pet";
        BM[10].desc="";
        BM[10].max=2;
        BM[10].val=0;
        BM[10].tree_dep=15;

        BM[11].name="Ferocity";
        BM[11].desc="";
        BM[11].max=5;
        BM[11].val=0;
        BM[11].reqd=16;
        BM[11].tree_dep=15;

        BM[12].name="Spirit Bond";
        BM[12].desc="";
        BM[12].max=2;
        BM[12].val=0;
        BM[12].tree_dep=20;

        BM[13].name="Intimidation";
        BM[13].desc="";
        BM[13].max=1;
        BM[13].val=0;
        BM[13].reqd=18;
        BM[13].tree_dep=20;

        BM[14].name="Bestial Discipline";
        BM[14].desc="";
        BM[14].max=2;
        BM[14].val=0;
        BM[14].tree_dep=20;

        BM[15].name="Animal Handler";
        BM[15].desc="";
        BM[15].max=2;
        BM[15].val=0;
        BM[15].tree_dep=25;

        BM[16].name="Frenzy";
        BM[16].desc="";
        BM[16].max=5;
        BM[16].val=0;
        BM[16].dep=11;
        BM[16].tree_dep=25;

        BM[17].name="Ferocious Inspiration";
        BM[17].desc="";
        BM[17].max=3;
        BM[17].val=0;
        BM[17].reqd=20;
        BM[17].tree_dep=30;

        BM[18].name="Bestial Wrath";
        BM[18].desc="";
        BM[18].max=1;
        BM[18].val=0;
        BM[18].dep=13;
        BM[18].reqd=23;
        BM[18].tree_dep=30;

        BM[19].name="Catlike Reflexes";
        BM[19].desc="";
        BM[19].max=3;
        BM[19].val=0;
        BM[19].tree_dep=30;

        BM[20].name="Invigoration";
        BM[20].desc="";
        BM[20].max=2;
        BM[20].val=0;
        BM[20].dep=17;
        BM[20].tree_dep=35;

        BM[21].name="Serpent's Swiftness";
        BM[21].desc="";
        BM[21].max=5;
        BM[21].val=0;
        BM[21].reqd=24;
        BM[21].tree_dep=35;

        BM[22].name="Longevity";
        BM[22].desc="";
        BM[22].max=3;
        BM[22].val=0;
        BM[22].tree_dep=40;

        BM[23].name="The Beast Within";
        BM[23].desc="";
        BM[23].max=1;
        BM[23].val=0;
        BM[23].dep=18;
        BM[23].tree_dep=40;

        BM[24].name="Cobra Strikes";
        BM[24].desc="";
        BM[24].max=3;
        BM[24].val=0;
        BM[24].dep=21;
        BM[24].tree_dep=40;

        BM[25].name="Kindred Spirits";
        BM[25].desc="";
        BM[25].max=5;
        BM[25].val=0;
        BM[25].tree_dep=45;

        BM[26].name="Beast Mastery";
        BM[26].desc="";
        BM[26].max=1;
        BM[26].val=0;
        BM[26].tree_dep=50;

        //Marksmanship
        MM[1].name="Improved Concussive Shot";
        MM[1].desc="";
        MM[1].max=2;
        MM[1].val=0;
        MM[1].tree_dep=0;

        MM[2].name="Focused Aim";
        MM[2].desc="";
        MM[2].max=3;
        MM[2].val=3;
        MM[2].tree_dep=0;

        MM[3].name="Lethal Shots";
        MM[3].desc="";
        MM[3].max=5;
        MM[3].val=5;
        MM[3].tree_dep=0;

        MM[4].name="Careful Aim";
        MM[4].desc="";
        MM[4].max=3;
        MM[4].val=3;
        MM[4].tree_dep=5;

        MM[5].name="Improved Hunter's Mark";
        MM[5].desc="";
        MM[5].max=3;
        MM[5].val=1;
        MM[5].tree_dep=5;

        MM[6].name="Mortal Shots";
        MM[6].desc="";
        MM[6].max=5;
        MM[6].val=5;
        MM[6].reqd=9;
        MM[6].tree_dep=5;

        MM[7].name="Go for the Throat";
        MM[7].desc="";
        MM[7].max=2;
        MM[7].val=0;
        MM[7].tree_dep=10;

        MM[8].name="Improved Arcane Shot";
        MM[8].desc="";
        MM[8].max=3;
        MM[8].val=0;
        MM[8].tree_dep=10;

        MM[9].name="Aimed Shot";
        MM[9].desc="";
        MM[9].max=1;
        MM[9].val=1;
        MM[9].dep=6;
        MM[9].tree_dep=10;

        MM[10].name="Rapid Killing";
        MM[10].desc="";
        MM[10].max=2;
        MM[10].val=2;
        MM[10].tree_dep=10;

        MM[11].name="Improved Stings";
        MM[11].desc="";
        MM[11].max=3;
        MM[11].val=3;
        MM[11].tree_dep=15;

        MM[12].name="Efficiency";
        MM[12].desc="";
        MM[12].max=5;
        MM[12].val=0;
        MM[12].tree_dep=15;

        MM[13].name="Concussive Barrage";
        MM[13].desc="";
        MM[13].max=2;
        MM[13].val=0;
        MM[13].tree_dep=20;

        MM[14].name="Readiness";
        MM[14].desc="";
        MM[14].max=1;
        MM[14].val=1;
        MM[14].reqd=19;
        MM[14].tree_dep=20;

        MM[15].name="Barrage";
        MM[15].desc="";
        MM[15].max=3;
        MM[15].val=3;
        MM[15].reqd=20;
        MM[15].tree_dep=20;

        MM[16].name="Combat Experience";
        MM[16].desc="";
        MM[16].max=2;
        MM[16].val=2;
        MM[16].tree_dep=25;

        MM[17].name="Ranged Weapon Specialization";
        MM[17].desc="";
        MM[17].max=3;
        MM[17].val=3;
        MM[17].tree_dep=25;

        MM[18].name="Piercing Shots";
        MM[18].desc="";
        MM[18].max=3;
        MM[18].val=3;
        MM[18].tree_dep=30;

        MM[19].name="Trueshot Aura";
        MM[19].desc="";
        MM[19].max=1;
        MM[19].val=1;
        MM[19].dep=14;
        MM[19].tree_dep=30;

        MM[20].name="Improved Barrage";
        MM[20].desc="";
        MM[20].max=3;
        MM[20].val=3;
        MM[20].dep=15;
        MM[20].tree_dep=30;

        MM[21].name="Master Marksman";
        MM[21].desc="";
        MM[21].max=5;
        MM[21].val=5;
        MM[21].reqd=24;
        MM[21].tree_dep=35;

        MM[22].name="Rapid Recuperation";
        MM[22].desc="";
        MM[22].max=2;
        MM[22].val=1;
        MM[22].tree_dep=35;

        MM[23].name="Wild Quiver";
        MM[23].desc="";
        MM[23].max=3;
        MM[23].val=3;
        MM[23].tree_dep=40;

        MM[24].name="Silencing Shot";
        MM[24].desc="";
        MM[24].max=1;
        MM[24].val=1;
        MM[24].dep=21;
        MM[24].tree_dep=40;

        MM[25].name="Improved Steady Shot";
        MM[25].desc="";
        MM[25].max=3;
        MM[25].val=2;
        MM[25].tree_dep=40;

        MM[26].name="Marked for Death";
        MM[26].desc="";
        MM[26].max=5;
        MM[26].val=5;
        MM[26].tree_dep=45;

        MM[27].name="Chimera Shot";
        MM[27].desc="";
        MM[27].max=1;
        MM[27].val=1;
        MM[27].tree_dep=50;

        //Survival
        SV[1].name="Improved Tracking";
        SV[1].desc="";
        SV[1].max=5;
        SV[1].val=5;
        SV[1].tree_dep=0;

        SV[2].name="Hawk Eye";
        SV[2].desc="";
        SV[2].max=3;
        SV[2].val=0;
        SV[2].tree_dep=0;

        SV[3].name="Savage Strikes";
        SV[3].desc="";
        SV[3].max=2;
        SV[3].val=0;
        SV[3].tree_dep=0;

        SV[4].name="Surefooted";
        SV[4].desc="";
        SV[4].max=3;
        SV[4].val=0;
        SV[4].tree_dep=5;

        SV[5].name="Entrapment";
        SV[5].desc="";
        SV[5].max=3;
        SV[5].val=0;
        SV[5].tree_dep=5;

        SV[6].name="Trap Mastery";
        SV[6].desc="";
        SV[6].max=3;
        SV[6].val=0;
        SV[6].tree_dep=5;

        SV[7].name="Survival Instincts";
        SV[7].desc="";
        SV[7].max=2;
        SV[7].val=2;
        SV[7].tree_dep=5;

        SV[8].name="Survivalist";
        SV[8].desc="";
        SV[8].max=5;
        SV[8].val=0;
        SV[8].reqd=14;
        SV[8].tree_dep=10;

        SV[9].name="Scatter Shot";
        SV[9].desc="";
        SV[9].max=1;
        SV[9].val=0;
        SV[9].tree_dep=10;

        SV[10].name="Deflection";
        SV[10].desc="";
        SV[10].max=3;
        SV[10].val=0;
        SV[10].reqd=16;
        SV[10].tree_dep=10;

        SV[11].name="Survival Tactics";
        SV[11].desc="";
        SV[11].max=2;
        SV[11].val=0;
        SV[11].tree_dep=10;

        SV[12].name="T.N.T.";
        SV[12].desc="";
        SV[12].max=3;
        SV[12].val=0;
        SV[12].tree_dep=15;

        SV[13].name="Lock and Load";
        SV[13].desc="";
        SV[13].max=3;
        SV[13].val=0;
        SV[13].tree_dep=15;

        SV[14].name="Hunter vs. Wild";
        SV[14].desc="";
        SV[14].max=3;
        SV[14].val=0;
        SV[14].dep=8;
        SV[14].tree_dep=20;

        SV[15].name="Killer Instinct";
        SV[15].desc="";
        SV[15].max=3;
        SV[15].val=0;
        SV[15].reqd=20;
        SV[15].tree_dep=20;

        SV[16].name="Counterattack";
        SV[16].desc="";
        SV[16].max=1;
        SV[16].val=0;
        SV[16].dep=10;
        SV[16].tree_dep=20;

        SV[17].name="Lightning Reflexes";
        SV[17].desc="";
        SV[17].max=5;
        SV[17].val=0;
        SV[17].reqd=19;
        SV[17].tree_dep=25;

        SV[18].name="Resourcefulness";
        SV[18].desc="";
        SV[18].max=3;
        SV[18].val=0;
        SV[18].tree_dep=25;

        SV[19].name="Expose Weakness";
        SV[19].desc="";
        SV[19].max=3;
        SV[19].val=0;
        SV[19].dep=17;
        SV[19].tree_dep=30;

        SV[20].name="Wywern Sting";
        SV[20].desc="";
        SV[20].max=1;
        SV[20].val=0;
        SV[20].dep=15;
        SV[20].reqd=23;
        SV[20].tree_dep=30;

        SV[21].name="Thrill of the Hunt";
        SV[21].desc="";
        SV[21].max=3;
        SV[21].val=0;
        SV[21].reqd=27;
        SV[21].tree_dep=30;

        SV[22].name="Master Tactician";
        SV[22].desc="";
        SV[22].max=5;
        SV[22].val=0;
        SV[22].tree_dep=35;

        SV[23].name="Noxious Stings";
        SV[23].desc="";
        SV[23].max=3;
        SV[23].val=0;
        SV[23].dep=20;
        SV[23].tree_dep=35;

        SV[24].name="Point of No Escape";
        SV[24].desc="";
        SV[24].max=2;
        SV[24].val=0;
        SV[24].tree_dep=40;

        SV[25].name="Black Arrow";
        SV[25].desc="";
        SV[25].max=1;
        SV[25].val=0;
        SV[25].reqd=28;
        SV[25].tree_dep=40;

        SV[26].name="Sniper Training";
        SV[26].desc="";
        SV[26].max=3;
        SV[26].val=0;
        SV[26].tree_dep=40;

        SV[27].name="Hunting Party";
        SV[27].desc="";
        SV[27].max=3;
        SV[27].val=0;
        SV[27].dep=21;
        SV[27].tree_dep=45;

        SV[28].name="Explosive Shot";
        SV[28].desc="";
        SV[28].max=1;
        SV[28].val=0;
        SV[28].dep=25;
        SV[28].tree_dep=50;
    }

    public void SetMMBuild()
    {
        AllReset();
        BM[1].val=5;
        BM[3].val=2;
        MM[2].val=3;
        MM[3].val=5;
        MM[4].val=3;
        MM[5].val=1;
        MM[6].val=5;
        MM[9].val=1;
        MM[10].val=2;
        MM[11].val=3;
        MM[14].val=1;
        MM[15].val=3;
        MM[16].val=2;
        MM[17].val=3;
        MM[18].val=3;
        MM[19].val=1;
        MM[20].val=3;
        MM[21].val=5;
        MM[22].val=1;
        MM[23].val=3;
        MM[24].val=1;
        MM[25].val=2;
        MM[26].val=5;
        MM[27].val=1;
        SV[1].val=5;
        SV[7].val=2;
        BMp=7;
        MMp=57;
        SVp=7;
    }

    public void SetSVBuild()
    {
        AllReset();
        MM[3].val=5;
        MM[4].val=3;
        MM[6].val=5;
        MM[9].val=1;
        SV[1].val=5;
        SV[6].val=3;
        SV[7].val=2;
        SV[8].val=5;
        SV[12].val=3;
        SV[13].val=3;
        SV[14].val=3;
        SV[15].val=3;
        SV[17].val=5;
        SV[18].val=3;
        SV[19].val=2;
        SV[20].val=1;
        SV[21].val=3;
        SV[22].val=5;
        SV[23].val=3;
        SV[25].val=1;
        SV[26].val=3;
        SV[27].val=3;
        SV[28].val=1;
        BMp=0;
        MMp=14;
        SVp=57;
    }

    public void SetBMBuild()
    {
        AllReset();
        BM[1].val=5;
        BM[3].val=2;
        BM[4].val=3;
        BM[6].val=2;
        BM[8].val=1;
        BM[9].val=5;
        BM[11].val=5;
        BM[13].val=1;
        BM[14].val=2;
        BM[15].val=1;
        BM[16].val=4;
        BM[17].val=3;
        BM[18].val=1;
        BM[20].val=2;
        BM[21].val=5;
        BM[22].val=3;
        BM[23].val=1;
        BM[25].val=5;
        BM[26].val=1;
        MM[3].val=5;
        MM[4].val=3;
        MM[6].val=5;
        MM[9].val=1;
        SV[1].val=5;
        BMp=52;
        MMp=14;
        SVp=5;
    }
}
